package demo1;

public abstract class Card implements Payable{
    private String name;
    private double balance;
    public Card(String name,double balance){
        this.name = name;
        this.balance = balance;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public abstract double pay(double payment);
}
